1 Technical Field
The present invention relates to an audio encoder which codes a multi-channel signal, and particularly relates to an audio encoder which generates a coded signal that allows the multi-channel signal to be reproduced by an inexpensive decoder.
The present invention also relates to an audio decoder which decodes the coded signal encoded by the aforementioned audio encoder, and particularly relates to an audio decoder which reproduces the multi-channel signal by two channels.
2 Background Art
Conventionally researches and developments related to an audio encoder, which generates a coded signal that allows the multi-channel signal to be reproduced by an inexpensive reproducing device especially by a two-channel reproducing device, have been carried out. For example the MPEG-2 audio standard (ISO13818-3) discloses a technique that a signal downmixed from a multi-channel signal to a two-channel signal and a signal to restore the downmixed signal to a multi-channel signal are separated from each other, and then the signals are coded as a first coded signal and a second coded signal respectively, and only the first coded signal can be decoded by an inexpensive decoder. (Non-patent reference 1: the MPEG-2 audio standard, ISO13818-3)
However there has been a problem that separating the first coded signal and the second coded signal is not easy in the MPEG-2 audio standard.
FIG. 1 shows a structure of a coded signal (bit stream) by the MPEG-2 audio standard. In FIG. 1, the frame header information 900 indicates a start position of coded information for one frame coded every 1152 samples. A first coded signal 901 is a coded signal generated by coding a stereo signal downmixed from a multi-channel signal to a two-channel signal. A second coded signal 902 is a coded signal obtained by coding information to restore the downmixed signal to a multi-channel signal.
Now it is assumed that a decoder is expected to decode only the first coded signal 901. For example, a decoder in a cellular phone or the like designed presuming only two-channel reproduction obtains and decodes the first coded signal 901. And then the decoder is expected to skip the second coded signal 902. However, is not possible to obtain the size of the second coded signal 902 easily due to the following reason, so that it is not easy to skip the second coded signal 902. The frame size of each frame can be obtained easily by analyzing the frame header information 900 of each frame. However the code size of the first coded signal 901 is variable for each frame as exemplified in the figure, and thus the code size of the second coded signal 902 is naturally variable. Hence the code size of the second coded signal 902 can be found only by deducting the code size of the first coded signal 901 of the frame from the frame size of the frame concerned. Consequently at the time of decoding the first coded signal 901, the code size of the first coded signal 901 needs calculations each time. As a result, there exists a problem that a large volume of operation resources needs to be spent undesirably.
Additionally, the following problem is also apparent in the conventional technique.
According to the MPEG-2 audio standard, since the decoded downmixed signal is downmixed by a specified matrix operation at the time of sampling, the original spatial information of the multi-channel signal seems to be lost. Accordingly in the case where the signal downmixed to a two-channel signal is expected to be reproduced after reproducing the original spatial information, in other words, in the case where the two-channel signal to which virtual surround-sound processing being applied is expected to be reproduced, the spatial information needs to be executed filter processing based on a head-related transfer function after the multi-channel signal is decoded using the first coded signal 901 and the second coded signal 902. As a result there exists a problem that a large volume of operation resources needs to be spent undesirably.
In view of these existing problems, an object of the present invention is to provide an audio encoder which generates a coded signal having a code size that can be easily found. Here the coded signal is the coded information to restore the downmixed signal to a multi-channel signal.
The second object of the present invention is to provide an audio encoder which generates coded information, which makes it possible to reproduce the spatial information of the original multi-channel by reproducing only the downmixed signal.
The third object of the present invention is to provide an audio decoder which decodes the coded signal which has been coded by such an audio encoder with less amount of operation.
Summary of the Invention
In order to achieve the aforesaid objects, an audio encoder of the present invention is characterized by including: a downmix unit to downmix a multi-channel signal exceeding two channels to a two-channel stereo signal; a first coding unit to generate a first coded signal by coding the downmixed stereo signal; a second coding unit to generate a second coded signal by coding information for restoring the downmixed stereo signal to a multi-channel signal; a code size calculating unit to calculate a code size of the second coded signal; and a multiplexing unit to multiplex the first coded signal, the second coded signal and a signal representing the calculated code size.
In addition, the multiplexing unit may include a first multiplexing unit to multiplex the code size calculated by the code size calculating unit and the second coded signal; and a second multiplexing unit to multiplex the first coded signal with the second coded signal in which the code size is multiplexed.
In addition, the first multiplexing unit may multiplex the code size calculated by the code size calculating unit, placing the code size at the head of the second coded signal.
In addition, the first multiplexing unit may multiplex the code size calculated by the code size calculating unit, placing the code size immediately after an indicator to identify the start of the second coded signal.
In addition, the first multiplexing unit may multiplex the code size in the second coded signal by describing the code size calculated by the code size calculating unit in variable length.
In addition, the downmix unit may perform an operation using a head-related transfer function, and perform downmix processing on the multi-channel signal.
In addition, the downmix unit may perform the operation using the head-related transfer function on the multi-channel signal in a frequency domain.
In addition, the second coded signal may have invalid data, and the code size calculating unit may calculate a code size of the second coded signal having the invalid data.
In order to solve the aforesaid problem, the audio decoder of the present invention includes an obtaining unit to obtain coded signals having a) a first coded signal obtained by coding a two-channel stereo signal downmixed from a multi-channel signal exceeding two channels, b) a second coded signal obtained by coding information for generating a multi-channel signal from the stereo signal, and c) a signal representing a code size of the second coded signal, and a decoding unit to decode the obtained coded signals, and to output a stereo signal.
In addition, the decoding unit includes: a first coded signal readout unit to read the first coded signal out of the obtained coded signals; a code size readout unit to read a signal representing a code size of the second coded signal out of the coded signals; and a first decoding unit to decode the first coded signal read out by the first coded signal readout unit, and to output the stereo signal, and the first coded signal readout unit may skip the second coded signal based on a signal representing the code size read out by the code size readout unit.
In addition, the first coded signal is coded from a stereo signal to which virtual surround-sound effect is applied beforehand by the operation using a head-related transfer function, and the first decoding unit may output the stereo signal to which virtual surround-sound effect is applied.
In addition, the audio decoder may further include: a second coded signal readout unit to read the second coded signal out of the coded signals; a second decoding unit to decode a multi-channel signal based on the read-out first coded signal and the read-out second coded signal; a filter unit to perform filter processing to the decoded multi-channel signal based on the head-related transfer function, and to output the stereo signal to which virtual surround-sound effect is applied; and a selecting unit to select one of the stereo signal outputted out of the first decoding unit and the stereo signal to which virtual surround-sound effect is applied outputted out of the filter unit.
In addition, the first decoding unit may generate a frequency domain signal of the stereo signal, and the filter unit may perform filter processing based on the head-related transfer function to the frequency domain signal of the restored multi-channel signal from the frequency domain signal of the stereo signal, generate a two-channel frequency domain signal, and subsequently convert the frequency domain signal to a time domain signal.
In addition, the audio decoder may further include: an electric power supplying unit to supply electric power in order to drive at least the second decoding unit; and the selecting unit to select the stereo signal from the first decoding unit in a case where the electric supply from the electric supply unit falls to below a predetermined value.
In addition, the signal representing the code size of the second coded signal read out by the code size readout unit may be a signal representing a code size of the second coded signal including invalid data.
According to the present invention, it becomes possible to generate a coded signal that makes it easy to find a code size of the second coded signal for an audio decoder. Here the second coded signal is obtained by coding necessary information to restore the downmixed signal to a multi-channel signal. Hence a reproducing device for reproducing only a downmixed signal is able to decode and reproduce only the downmixed signal easily.
According to the present invention, a signal representing the code size of the second coded signal can be obtained from the position located immediately after the start position of the second coded signal.
According to the present invention, the signal representing the code size of the second coded signal can be multiplexed by variable code lengths depending on the value, so that the number of bits for multiplexing the signal representing the code size can be reduced.
Further according to the present invention, since downmix processing can be executed on frequency domain, in a case where the second coding unit executes coding processing for signal in a frequency domain, the downmix processing and the second coding processing can be executed efficiently as a result.
According to the present invention, the first coding unit handles signals in a band not more than one half, so that compressing ratio can be improved. In a case where only the coded signal coded by the first coding unit is reproduced, a reproducing device handles signals in a band not more than one half, so that the number of operations for decoding can be reduced. Besides a band expanding technology (ISO/IEC14496-3) whose extensive research and development being recently carried out is a technology to increase the signal in a band not more than one half, so that the interfacing with the technology can be facilitated.
Besides, according to the present invention, the downmixed signal becomes the signal to which filter processing of the head-related transfer function is executed. Hence in a case where only the first coded signal is reproduced, the original multi-channel spatial information is reflected.
Furthermore, according to the present invention, the downmixed signal becomes the signal to which filter processing of the head-related transfer function is executed. Hence in a case where only the first coded signal is reproduced, the original multi-channel spatial information is reflected. Moreover the processing of the head-related transfer function is executed in a frequency domain. Thus in a case where the audio compression technologies, which are major in recent years such as the AAC standard (ISO/IEC13818-7) and the AAC-SBR standard (ISO/IEC 14496-3), are combined, the processing can be executed with less number of operations. This is because these standards are the methods of compression coding for the signal in a frequency domain.
Furthermore, according to the present invention, in a case where only the downmixed signal is expected to be decoded, it is possible to remove information for multi channellizing by easy processing.
Furthermore, according to the present invention, it is possible to choose either a reproduction sound of the downmixed signal or a reproduction sound of a multi-channel signal to which filter processing based on the head-related transfer function being executed.
Furthermore, according to the present invention, after filter processing based on the head-related transfer function in a frequency domain is executed, and then a frequency domain signal for two channels is generated. The frequency domain signal can be converted into a time domain signal, and in the case where the audio compression technologies, which are major in recent years such as the AAC standard (ISO/IEC13818-7) and the AAC-SBR standard (ISO/IEC 14496-3), are combined, the processing can be executed with less number of operations. This is because these standards are the methods of compression coding for the signal in a frequency domain.
Furthermore, according to the present invention, in a case where the power to drive the audio decoder is decreased, for example, the audio decoder runs low on the battery, the mode is automatically shifted to decoding the downmixed signal automatically, so that the battery life is extended. The listener is able to know that the audio decoder runs low on the battery by the change of audio quality.
Numerical References
    100 and 500 Downmix unit    101 and 501 First coding unit    102 and 502 Second coding unit    103 and 503 Code size calculating unit    104 and 504 First multiplexing unit    105 and 505 Second multiplexing unit    600, 700 and 800 First coded signal extracting unit    601, 701 and 801 Second coded signal extracting unit    602, 702 and 802 First decoding unit    603, 703 and 803 Code size extracting unit    604, 704 and 804 Substantial signal extracting unit    705 and 805 Second decoding unit    706 and 806 Filter unit    707 and 807 Selecting unit    900 Frame header information    901 The first coded signal    902 The second coded signal